{% extends 'base.html' %}
{% block title %}
    <title>{{ title }}</title>
{% endblock %}
{% block extra_head %}
    <link rel='stylesheet' href='{{ STATIC_URL }}pp_case.css' type='text/css' />
{% endblock %}
{% block body %}
<body>
<h1>{{ Title }}</h1>
<table>
    <h1>未开始处理订单</h1>
</table>
<table class="pretty-table">
    <tr>
        <th>CaseID</th><th>订单号</th><th>金额</th><th>币种</th><th>支付号</th><th>投诉开始日期</th><th>投诉类型</th>
    </tr>
{%  for case in initiated_pp_case %}
    <tr>
        <td><a href={{ case.get_absolute_url}}>{{ case.caseID}}</a> </td>
        <td><a href="http://ht.milanoo.com/milanooht/index.php?module_id=73&OrdersCid={{ case.orderNo }}">{{ case.orderNo }}</a></td>
        <td>{{ case.paymentAmount }}</td>
        <td>{{ case.paymentCurrency }}</td>
        <td>{{ case.transactionID }}</td>
        <td>{{ case.caseStartDate }}</td>
        <td>{{ case.paypalCaseDeclaration }}</td>
        <td><a href={{ get_absolute_url}}/pp_case/{{ case.caseID }}/investigate>调查</a> </td>
    </tr>
 {% endfor %}
</table>
<table>
    <h1>PayPal跟新的订单</h1>
</table>
<table class="pretty-table">
    <tr>
        <th>CaseID</th><th>订单号</th><th>金额</th><th>币种</th><th>支付号</th><th>投诉开始日期</th><th>投诉类型</th><th>跟新日期</th><th>跟新动作</th>
    </tr>
{%  for case in updated_pp_case %}
    <tr>
        <td><a href={{ case.get_absolute_url}}>{{ case.caseID}}</a> </td>
        <td><a href="http://ht.milanoo.com/milanooht/index.php?module_id=73&OrdersCid={{ case.orderNo }}">{{ case.orderNo }}</a></td>
        <td>{{ case.paymentAmount }}</td>
        <td>{{ case.paymentCurrency }}</td>
        <td>{{ case.transactionID }}</td>
        <td>{{ case.caseStartDate }}</td>
        <td>{{ case.paypalCaseDeclaration }}</td>
        <td>{{ case.paypalRefreshDate }}</td>
        {% if case.paypalCaseWindow == 2 %}
            <td><a href={{ case.get_absolute_url }}endcase/>已结束</a></td>
        {% else %}
            <td><a href={{ case.get_absolute_url }}handle/>继续处理</a></td>
        {% endif %}
    </tr>
 {% endfor %}
</table>

</body>
{% endblock %}